3.50 \(\int x^3 (a+b \log (c x^n))^2 \, dx\)

Optimal. Leaf size=52 \[ \frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{32} b^2 n^2 x^4 \]

[Out]

1/32*b^2*n^2*x^4-1/8*b*n*x^4*(a+b*ln(c*x^n))+1/4*x^4*(a+b*ln(c*x^n))^2

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2305, 2304} \[ \frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{32} b^2 n^2 x^4 \]

Antiderivative was successfully verified.

[In]

Int[x^3*(a + b*Log[c*x^n])^2,x]

[Out]

(b^2*n^2*x^4)/32 - (b*n*x^4*(a + b*Log[c*x^n]))/8 + (x^4*(a + b*Log[c*x^n])^2)/4

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rubi steps

\begin {align*} \int x^3 \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} (b n) \int x^3 \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=\frac {1}{32} b^2 n^2 x^4-\frac {1}{8} b n x^4 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{4} x^4 \left (a+b \log \left (c x^n\right )\right )^2\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 43, normalized size = 0.83 \[ \frac {1}{32} x^4 \left (-4 b n \left (a+b \log \left (c x^n\right )\right )+8 \left (a+b \log \left (c x^n\right )\right )^2+b^2 n^2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^3*(a + b*Log[c*x^n])^2,x]

[Out]

(x^4*(b^2*n^2 - 4*b*n*(a + b*Log[c*x^n]) + 8*(a + b*Log[c*x^n])^2))/32

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 102, normalized size = 1.96 \[ \frac {1}{4} \, b^{2} n^{2} x^{4} \log \relax (x)^{2} + \frac {1}{4} \, b^{2} x^{4} \log \relax (c)^{2} - \frac {1}{8} \, {\left (b^{2} n - 4 \, a b\right )} x^{4} \log \relax (c) + \frac {1}{32} \, {\left (b^{2} n^{2} - 4 \, a b n + 8 \, a^{2}\right )} x^{4} + \frac {1}{8} \, {\left (4 \, b^{2} n x^{4} \log \relax (c) - {\left (b^{2} n^{2} - 4 \, a b n\right )} x^{4}\right )} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

1/4*b^2*n^2*x^4*log(x)^2 + 1/4*b^2*x^4*log(c)^2 - 1/8*(b^2*n - 4*a*b)*x^4*log(c) + 1/32*(b^2*n^2 - 4*a*b*n + 8
*a^2)*x^4 + 1/8*(4*b^2*n*x^4*log(c) - (b^2*n^2 - 4*a*b*n)*x^4)*log(x)

________________________________________________________________________________________

giac [B]  time = 0.39, size = 111, normalized size = 2.13 \[ \frac {1}{4} \, b^{2} n^{2} x^{4} \log \relax (x)^{2} - \frac {1}{8} \, b^{2} n^{2} x^{4} \log \relax (x) + \frac {1}{2} \, b^{2} n x^{4} \log \relax (c) \log \relax (x) + \frac {1}{32} \, b^{2} n^{2} x^{4} - \frac {1}{8} \, b^{2} n x^{4} \log \relax (c) + \frac {1}{4} \, b^{2} x^{4} \log \relax (c)^{2} + \frac {1}{2} \, a b n x^{4} \log \relax (x) - \frac {1}{8} \, a b n x^{4} + \frac {1}{2} \, a b x^{4} \log \relax (c) + \frac {1}{4} \, a^{2} x^{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

1/4*b^2*n^2*x^4*log(x)^2 - 1/8*b^2*n^2*x^4*log(x) + 1/2*b^2*n*x^4*log(c)*log(x) + 1/32*b^2*n^2*x^4 - 1/8*b^2*n
*x^4*log(c) + 1/4*b^2*x^4*log(c)^2 + 1/2*a*b*n*x^4*log(x) - 1/8*a*b*n*x^4 + 1/2*a*b*x^4*log(c) + 1/4*a^2*x^4

________________________________________________________________________________________

maple [C]  time = 0.21, size = 691, normalized size = 13.29 \[ \frac {b^{2} x^{4} \ln \left (x^{n}\right )^{2}}{4}+\frac {\left (-2 i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-b n +4 b \ln \relax (c )+4 a \right ) b \,x^{4} \ln \left (x^{n}\right )}{8}+\frac {\left (-2 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+4 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+4 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-8 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{4}+2 i \pi \,b^{2} n \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-8 i \pi \,b^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \relax (c )-8 i \pi a b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+8 a^{2}-2 i \pi \,b^{2} n \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi \,b^{2} n \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+8 i \pi \,b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (c )+8 i \pi \,b^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (c )+8 i \pi a b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+8 i \pi a b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+b^{2} n^{2}-2 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{4}+4 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{5}-2 \pi ^{2} b^{2} \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{4}+4 \pi ^{2} b^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{5}+16 a b \ln \relax (c )-4 b^{2} n \ln \relax (c )+8 b^{2} \ln \relax (c )^{2}-4 a b n -2 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{6}-8 i \pi \,b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \relax (c )-8 i \pi a b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 i \pi \,b^{2} n \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )\right ) x^{4}}{32} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*ln(c*x^n))^2,x)

[Out]

1/4*b^2*x^4*ln(x^n)^2+1/8*b*x^4*(2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(
I*c)-2*I*b*Pi*csgn(I*c*x^n)^3+2*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)+4*b*ln(c)-b*n+4*a)*ln(x^n)+1/32*x^4*(-8*I*ln(
c)*Pi*b^2*csgn(I*c*x^n)^3-8*I*Pi*a*b*csgn(I*c*x^n)^3-2*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)^2-8*Pi
^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^4*csgn(I*c)+4*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^3*csgn(I*c)^2+2*I*Pi*b^2*n*c
sgn(I*c*x^n)^3+4*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)+8*a^2+b^2*n^2+16*ln(c)*a*b-4*ln(c)*b^2*n+8*l
n(c)^2*b^2-2*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4+4*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^5-4*a*b*n-2*Pi^2*b^2*
csgn(I*c*x^n)^6+4*Pi^2*b^2*csgn(I*c*x^n)^5*csgn(I*c)-2*Pi^2*b^2*csgn(I*c*x^n)^4*csgn(I*c)^2+8*I*Pi*a*b*csgn(I*
c*x^n)^2*csgn(I*c)-2*I*Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)^2-2*I*Pi*b^2*n*csgn(I*c*x^n)^2*csgn(I*c)+8*I*ln(c)*P
i*b^2*csgn(I*x^n)*csgn(I*c*x^n)^2+8*I*ln(c)*Pi*b^2*csgn(I*c*x^n)^2*csgn(I*c)+8*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x
^n)^2-8*I*ln(c)*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-8*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+2*I*
Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c))

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 71, normalized size = 1.37 \[ \frac {1}{4} \, b^{2} x^{4} \log \left (c x^{n}\right )^{2} - \frac {1}{8} \, a b n x^{4} + \frac {1}{2} \, a b x^{4} \log \left (c x^{n}\right ) + \frac {1}{4} \, a^{2} x^{4} + \frac {1}{32} \, {\left (n^{2} x^{4} - 4 \, n x^{4} \log \left (c x^{n}\right )\right )} b^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

1/4*b^2*x^4*log(c*x^n)^2 - 1/8*a*b*n*x^4 + 1/2*a*b*x^4*log(c*x^n) + 1/4*a^2*x^4 + 1/32*(n^2*x^4 - 4*n*x^4*log(
c*x^n))*b^2

________________________________________________________________________________________

mupad [B]  time = 3.60, size = 61, normalized size = 1.17 \[ x^4\,\left (\frac {a^2}{4}-\frac {a\,b\,n}{8}+\frac {b^2\,n^2}{32}\right )+\frac {x^4\,\ln \left (c\,x^n\right )\,\left (a\,b-\frac {b^2\,n}{4}\right )}{2}+\frac {b^2\,x^4\,{\ln \left (c\,x^n\right )}^2}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a + b*log(c*x^n))^2,x)

[Out]

x^4*(a^2/4 + (b^2*n^2)/32 - (a*b*n)/8) + (x^4*log(c*x^n)*(a*b - (b^2*n)/4))/2 + (b^2*x^4*log(c*x^n)^2)/4

________________________________________________________________________________________

sympy [B]  time = 2.40, size = 131, normalized size = 2.52 \[ \frac {a^{2} x^{4}}{4} + \frac {a b n x^{4} \log {\relax (x )}}{2} - \frac {a b n x^{4}}{8} + \frac {a b x^{4} \log {\relax (c )}}{2} + \frac {b^{2} n^{2} x^{4} \log {\relax (x )}^{2}}{4} - \frac {b^{2} n^{2} x^{4} \log {\relax (x )}}{8} + \frac {b^{2} n^{2} x^{4}}{32} + \frac {b^{2} n x^{4} \log {\relax (c )} \log {\relax (x )}}{2} - \frac {b^{2} n x^{4} \log {\relax (c )}}{8} + \frac {b^{2} x^{4} \log {\relax (c )}^{2}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*ln(c*x**n))**2,x)

[Out]

a**2*x**4/4 + a*b*n*x**4*log(x)/2 - a*b*n*x**4/8 + a*b*x**4*log(c)/2 + b**2*n**2*x**4*log(x)**2/4 - b**2*n**2*
x**4*log(x)/8 + b**2*n**2*x**4/32 + b**2*n*x**4*log(c)*log(x)/2 - b**2*n*x**4*log(c)/8 + b**2*x**4*log(c)**2/4

________________________________________________________________________________________